<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('请求渠道列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>凭证号：</label>
                                <input type="text" name="serial"/>
                            </li>
                            <li>
                                <label>商户编号：</label>
                                <input type="text" name="merNo"/>
                            </li>
                            <li>
                                <label>交易卡号：</label>
                                <input type="text" name="pan"/>
                            </li>
                            <li>
                                <label>终端流水：</label>
                                <input type="text" name="stan"/>
                            </li>
                            <li>
                                <label>终端号：</label>
                                <input type="text" name="terno"/>
                            </li>
                            <li class="select-time">
                                <label>交易日期：</label>
                                <input type="text" class="time-input" id="startTime" placeholder="开始日期" name="params[beginAddTime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束日期" name="params[endAddTime]"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">

            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('bankRequestdata:bankRequestdata:edit')}]];
        var removeFlag = [[${@permission.hasPermi('bankRequestdata:bankRequestdata:remove')}]];
        var prefix = ctx + "bankRequestdata/bankRequestdata";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "请求渠道",
                clickToSelect:true,
                columns: [
                    {
                        field: 'serial',
                        title: '唯一凭证号',
                    },
                    {
                        field: 'pan',
                        title: '交易卡号'
                    },
                    {
                        field: 'amount',
                        title: '交易金额'
                    },
                    {
                        field: 'stan',
                        title: '终端流水号'
                    },
                    {
                        field: 'merno',
                        title: '渠道商户号'
                    },
                    {
                        field: 'terno',
                        title: '商户终端号'
                    },

                    {
                        field: 'postype',
                        title: '交易类型',
                        formatter: function (value, row, index) {
                            if ("H007" == value) {
                                return "消费";
                            } else if ("H014" == value) {
                                return "退货";
                            } else if ("S007" == value) {
                                return "SIM卡年费";
                            } else if ("V007" == value) {
                                return "会员交易";
                            } else if ("C007" == value) {
                                return "手机充值";
                            } else {
                                return "未知";
                            }
                        }
                    },
                    {
                        field: 'merNo',
                        title: '商户号'
                    },
                    {
                        field: 'localdate',
                        title: '交易日期'
                    },
                    {
                        field: 'localtime',
                        title: '交易时间'
                    }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>